package com.fire.nacos.config.web;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.context.annotation.ScopedProxyMode;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author Mr.Fire
 * @date 2022/1/10 11:04
 * @desc
 */
@RestController
@RefreshScope
public class ConigTestController {

    @Value("${custom.name}")
    private String name;

    @Value("${custom.pwd}")
    private String pwd;


    @GetMapping("/test-config")
    public String testConfig(){
        return String.format("自定义属性:name=%s,pwd=%s",name,pwd);
    }


}
